From 8748263c4c1ef330b67700884860288b3139f303 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Sun, 26 Jan 2003 21:36:15 +0000 Subject: [PATCH] (c-require-final-newline): Added a variable to make the initialization of require-final-newline' more configurable. --- lisp/progmodes/cc-mode.el | 2 +- lisp/progmodes/cc-vars.el | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 40e5a3107a8..5148ff72dea 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -326,7 +326,7 @@ 'c-indent-new-comment-line))) ;; now set their values - (setq require-final-newline t + (setq require-final-newline c-require-final-newline parse-sexp-ignore-comments t indent-line-function 'c-indent-line indent-region-function 'c-indent-region diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index 2b88a131776..50b09160ee3 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el @@ -704,6 +704,13 @@ space." :type 'function :group 'c) +(defcustom c-require-final-newline t + "*Controls whether a final newline is added to the file when saved. +This value is given to `require-final-newline' at mode initialization; +see that variable for details." + :type 'symbol + :group 'c) + (defcustom c-electric-pound-behavior nil "*List of behaviors for electric pound insertion. Only currently supported behavior is `alignleft'." -- 2.30.2